﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page contentType="text/html;charset=utf-8" pageEncoding="UTF-8"
	language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	session.removeAttribute("_LOGONUSER_");
%>
<head>
<TITLE>71bill管理平台</TITLE>
<META name="GENERATOR" content="MSHTML 11.00.9600.16663">
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
	<LINK href="<%=request.getContextPath()%>/style/indexstyle.css" rel="stylesheet" type="text/css">
	<script src="<%=request.getContextPath()%>/script/jquery-1.4.2.js" type="text/javascript"></script>
		<script type="text/javascript">
			//enter登录 火狐和ie都支持
			function enterSubmitForm() {
				if (window.event.keyCode == 13) {
					$('#loginForm').submit();
				}
			}

			var tp = true;

			function reflashVerifyCode(temp) {
				if (temp == 1) {
					var ctrl = document.getElementById("_verifycode");
					ctrl.src = "<%=request.getContextPath()%>/manage/login/verify?rnd="
							+ new Date().getTime()
							+ parseInt(Math.random() * (10000));
					$("#_verifycode").show();
					$("#changeVerifyCodeBtn").show();
					tp = false;
				} else if (tp) {
					var ctrl = document.getElementById("_verifycode");
					ctrl.src = "<%=request.getContextPath()%>/manage/login/verify?rnd="
							+ new Date().getTime()
							+ parseInt(Math.random() * (10000));
					$("#_verifycode").ready(function() {
						$("#_verifycode").show();
						$("#changeVerifyCodeBtn").show();
					});

				}
			}
			function beforesubmit() {
				var _msg = "";
				var _userName = $("#userName").val();
				var _passWord = $("#passWord").val();
				var _verifyCode = $("#verifyCode").val();
				if (!(_userName && _userName.length > 0)) {
					_msg = "请输入用户名";
				}
				if (!(_passWord && _passWord.length > 0)) {
					_msg = "请输入密码";
				}
				if (!(_verifyCode && _verifyCode.length > 0)) {
					_msg = "请输入验证码";
				}
				if (_msg != "") {
					alert(_msg)
				} else {
					$('#loginForm').submit();
				}
			}
			function handleblur(obj) {
				if (obj.id == 'userName') {
					if (obj.value == '') {
						obj.value = '手机号/邮箱/自定义用户';
					}
				}
				if (obj.id == 'passWord') {
					if (obj.value == '') {
						document.getElementById("spanPwd").innerHTML = '密码';
					}
				}
				if (obj.id == 'verifyCode') {
					if (obj.value == '') {
						obj.value = '验证码';
					}
				}
			}
			function handleFocus(obj) {
				if (obj.id == 'userName') {
					obj.value = "";
				}
				if (obj.id == 'passWord') {
					document.getElementById("spanPwd").innerHTML = "";
				}
				if (obj.id == 'verifyCode') {
					obj.value = "";
				}
			}
			$(document).ready(function(){
			  //直接加载验证码
			  reflashVerifyCode(0);
			});
			
		</script>
</HEAD>
<BODY>
	<FORM name="loginForm" id="loginForm" action="<%=request.getContextPath()%>/manage/login/toLogin" method="post">
		<DIV></DIV>
		<DIV></DIV>
		<DIV class="login">
			<DIV>
				<IMG width="300" height="90" alt="" src="<%=request.getContextPath()%>/images/logo.png">
			</DIV>
			<DIV class="login_con">
				<DIV class="userd">
					<INPUT name="userName" id="userName" onFocus="handleFocus(this)"
						onBlur="handleblur(this)" type="text" value="手机号/邮箱/自定义用户">
				</DIV>
				<DIV class="passd">
					<FONT class="fontUserName"><SPAN id="spanPwd">密码:</SPAN>
					</FONT> <INPUT name="passWord" id="passWord" style="width: 200px;"
						onFocus="handleFocus(this)" onBlur="handleblur(this)"
						type="password">
				</DIV>
				<DIV class="duod">
					<DIV class="yanzd">
						<INPUT name="verifyCode" onBlur="handleblur(this)" type="text"
							value="验证码" onkeydown="enterSubmitForm();"
                               id="verifyCode"
                               onfocus="handleFocus(this);reflashVerifyCode(0);">
					</DIV>
					<DIV class="yanzpic">
						<IMG style="vertical-align: middle; display: none;"
                             id="_verifycode" alt="验证码"> 
					</DIV>					
				</DIV>
				<DIV class="delu">
					<INPUT name="imgbtnLogin" id="imgbtnLogin"
						style="border-width: 0px; width: 82px; height: 33px;"
						onclick="beforesubmit();return false;" type="image" src="<%=request.getContextPath()%>/images/login.jpg">
                     <SPAN STYLE="color:red"> <c:if test="${null != errorMsg}">
                        <c:out value="${errorMsg}"/></c:if> </SPAN>
				</DIV>
                <!-- <div class="fm-item">
                        <label class="form-label"></label>
                        <input type="submit" value="" tabindex="4" id="send-btn" class="btn-login">

                        <div class="ui-form-explain"></div>
                    </div> -->
                
			</DIV>
		</DIV>
		<DIV class="infos">
			© 版权所有<IMG width="30" height="1" alt="" src="<%=request.getContextPath()%>/images/point.gif"><A
				href="#" target="_blank">联系我们</A>
		</DIV>
	</FORM>
</BODY>
</HTML>
